import request from "@/utils/request";

export function login(data) {
  return request({
    url: "/user/login",
    method: "post",
    data,
  });
}

export function register(data) {
  return request({
    url: "/user/register",
    method: "post",
    data,
  });
}


export function logout() {
  return request({
    url: "/user/logout",
    method: "get",
  });
}

export function getInfo() {
  return request({
    url: "/user/info",
    method: "get",
  });
}


export function userList(data) {
  return request({
    url: "/user/list",
    method: "get",
    params: data,
  });
}


export function userList2() {
  return request({
    url: "/user/list2",
    method: "get",
  });
}

export function delUser(data) {
  return request({
    url: "/user/delete",
    method: "get",
    params: data,
  });
}


export function addUser(data) {
  return request({
    url: "/user/add",
    method: "post",
    data
  });
}


export function updateUser(data) {
  return request({
    url: "/user/update",
    method: "post",
    data
  });
}

export function pwdUser(data) {
  return request({
    url: "/user/updatePwd",
    method: "post",
    data
  });
}